package com.PuzGame.combinenumbers;

import java.util.Comparator;


public abstract class MyComparator<T> implements Comparator<T>{

	protected boolean Reverse;
	
	public MyComparator(boolean StartReversed)
	{
		Reverse = StartReversed;
	}
	
	public abstract String GetTiltle();
	
	protected int SwapIfNeeded(int ans)
	{
		if(Reverse)
			return -ans;
		return ans;
	}
	
	public boolean getOrder()
	{
		return Reverse;
	}

	public void SwapOrder() {
		Reverse = !Reverse;
		
	}

}
